#ifndef SYSTEM_H_
#define SYSTEM_H_

#include <SFML/Graphics.hpp>
#include <Box2D/Box2D.h>
#include "PhysicsManager.h"
#include "ObjectManager.h"
#include "Enums.h"
#include "Debug.h"
#include "UserInput.h"
#include "Drawer.h"

class System
{
public:
	System();
	~System();

	void runLoop();
private:
	void setFramePreconditions();
	void initScene();
	void updateScene();
	void drawScene();
	void checkInput();

private:
	sf::RenderWindow *window;
	PhysicsManager* worldPhysics;
	ObjectManager* worldObjects;
	UserInput* input;
	Drawer* drawer;

	sf::Clock clock;
	sf::Time time;
	sf::Event event;

	Debug debugHelper;
	bool isDebugging;
};

#endif